Skip to content

Add 1.3 erase certificate feature for SET_CERTIFICATE#2433

Merged
jyao1 merged 2 commits into
DMTF:mainfrom
Wenxing-hou:sync_setcert_1.3
Jan 2, 2024
Merged

Add 1.3 erase certificate feature for SET_CERTIFICATE#2433
jyao1 merged 2 commits into
DMTF:mainfrom
Wenxing-hou:sync_setcert_1.3

Conversation

@Wenxing-hou
Copy link
Copy Markdown
Contributor

@Wenxing-hou Wenxing-hou commented Nov 14, 2023

Ref: #2292

  1. Add new 1.3 erase cert feature for set_certifcate;
  2. Add unit_test for erase cert feature;

The code has passed the unit_test.

@Wenxing-hou Wenxing-hou force-pushed the sync_setcert_1.3 branch 2 times, most recently from c7a9f75 to 118fd69 Compare November 15, 2023 01:40
Comment thread include/library/spdm_requester_lib.h Outdated
Comment thread include/hal/library/responder/setcertlib.h Outdated
@Wenxing-hou Wenxing-hou force-pushed the sync_setcert_1.3 branch 2 times, most recently from ad26d56 to 0a8f7b7 Compare November 16, 2023 07:45
Comment thread include/library/spdm_requester_lib.h Outdated
Comment thread library/spdm_requester_lib/libspdm_req_set_certificate.c Outdated
Comment thread include/library/spdm_requester_lib.h
Comment thread include/library/spdm_requester_lib.h
Comment thread os_stub/spdm_device_secret_lib_sample/lib.c
Comment thread include/industry_standard/spdm.h Outdated
Comment thread include/industry_standard/spdm.h Outdated
@Wenxing-hou Wenxing-hou force-pushed the sync_setcert_1.3 branch 2 times, most recently from 90c20ad to a0913e6 Compare November 20, 2023 03:56
@steven-bellock steven-bellock changed the title Add new 1.3 erase cert feature for set_certifcate Add 1.3 erase certificate feature for SET_CERTIFICATE Nov 20, 2023
Comment thread include/library/spdm_requester_lib.h Outdated
Comment thread include/hal/library/responder/setcertlib.h Outdated
Comment thread library/spdm_requester_lib/libspdm_req_set_certificate.c Outdated
Comment thread include/industry_standard/spdm.h Outdated
Comment thread library/spdm_requester_lib/libspdm_req_set_certificate.c Outdated
Comment thread library/spdm_responder_lib/libspdm_rsp_set_certificate.c Outdated
Comment thread library/spdm_responder_lib/libspdm_rsp_set_certificate.c Outdated
@Wenxing-hou Wenxing-hou marked this pull request as draft November 30, 2023 02:04
@Wenxing-hou Wenxing-hou marked this pull request as ready for review December 7, 2023 12:35
@Wenxing-hou Wenxing-hou force-pushed the sync_setcert_1.3 branch 3 times, most recently from e337b5d to 6d9aa22 Compare December 8, 2023 03:49
@jyao1 jyao1 requested a review from steven-bellock December 12, 2023 01:51
@Wenxing-hou
Copy link
Copy Markdown
Contributor Author

@steven-bellock Hi Steven, could you review again? I have fixed the code based on your feedback.

@steven-bellock
Copy link
Copy Markdown
Contributor

@Wenxing-hou the comment in https://github.com/DMTF/libspdm/pull/2433/files#r1400951233 is still valid. If the message was sent in a session then libspdm can check the exact size, else it cannot.

@Wenxing-hou
Copy link
Copy Markdown
Contributor Author

@Wenxing-hou the comment in https://github.com/DMTF/libspdm/pull/2433/files#r1400951233 is still valid. If the message was sent in a session then libspdm can check the exact size, else it cannot.

Thanks. I have fixed the code based on the feedback.

Comment thread include/industry_standard/spdm.h Outdated
@Wenxing-hou
Copy link
Copy Markdown
Contributor Author

And I have added the table in code comment:

* | Cert State in Slot | Req(KeyPairID,CertMode) | Req(Erase) | Res(KeyPairID,CertMode) | Action |
* |-----------------------|-------------------------|------------|-----------------------------|--------------------------|
* | Not exist | - | - | - | Invalid |
* | exist and empty | Valid | No | Not exist | Provision |
* | exist and empty | Valid | Yes | Not exist | Invalid |
* | exist with key | Valid | No | KeyPairID/CertMode match | Provision |
* | exist with key | Valid | Yes | KeyPairID/CertMode match | Invalid |
* | exist with key | Valid | No | KeyPairID/CertMode not match| Invalid(or OverWrite) |
* | exist with key | Valid | Yes | KeyPairID/CertMode not match| Invalid |
* |exist with key and cert| Valid | No | KeyPairID/CertMode match | Invalid(or OverWrite) |
* |exist with key and cert| Valid | Yes | KeyPairID/CertMode match | Erase Cert |
* |exist with key and cert| Valid | No | KeyPairID/CertMode not match| Invalid |
* |exist with key and cert| Valid | Yes | KeyPairID/CertMode not match| Invalid |

Comment thread include/hal/library/responder/setcertlib.h Outdated
Fix the issue: DMTF#2292

Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
@jyao1 jyao1 merged commit db32da6 into DMTF:main Jan 2, 2024
@Wenxing-hou Wenxing-hou deleted the sync_setcert_1.3 branch July 3, 2024 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants